# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1292508978.846772
_template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/search/content.mako'
_template_uri='search/content.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = []


def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        request = context.get('request', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'<style type="text/css">\n\t#search_options label{width:60px;}\n\t#form_search #submit{\n\t\tbackground:url(\'/image/global/button_search.png\')  no-repeat scroll 0 0 transparent;\n\t\tmargin-top:5px;\n\t\twidth:60px;\n\t\theight:30px;\n\t\tcursor:pointer;\n\t\tfloat:right;\n\t}\n\t#form_search #submit:hover{background:url(\'/image/global/button_search.png\') no-repeat scroll 0 -30px transparent;}\n\t#bottom_nav{\n\t\theight:25px;\n\t\twidth:100%;\n\t}\n\t#button_last_page{\n\t\tbackground:url(\'/image/global/button_last_page.png\')  no-repeat scroll 0 0 transparent;\n\t\twidth:60px;\n\t\theight:25px;\n\t\tcursor:pointer;\n\t\tfloat:right;\n\t}\n\t#button_last_page:hover{background:url(\'/image/global/button_last_page.png\') no-repeat scroll 0 -25px transparent;}\n\t#button_next_page{\n\t\tbackground:url(\'/image/global/button_next_page.png\')  no-repeat scroll 0 0 transparent;\n\t\twidth:60px;\n\t\theight:25px;\n\t\tcursor:pointer;\n\t\tfloat:right;\n\t}\n\t#button_next_page:hover{background:url(\'/image/global/button_next_page.png\') no-repeat scroll 0 -25px transparent;}\n\t.result_item{cursor:pointer;}\n\t.result_item:hover{background-color:#F9F9F9;}\n</style>\n<script type="text/javascript">\n\t$(document).ready(function(){\n\t\tvar pageId = parseInt($("#form_search #input_page").val());\n\t\t$("#form_search #input_page").val(0);\n\t\t$("#search_options #type" + ')
        # SOURCE LINE 39
        __M_writer(filters.decode.utf8(c.searchType))
        __M_writer(u').attr("checked", "checked");\n\t\t$("#search_options").buttonset();\n\t\t$("#form_search #submit").click(function(){$("#form_search").submit();});\n\t\tif ($("#button_last_page").size()){\n\t\t\t$("#button_last_page").click(function(){\n\t\t\t\t$("#form_search #input_page").val(pageId - 1);\n\t\t\t\t$("#form_search").submit();\n\t\t\t});\n\t\t}\n\t\tif ($("#button_next_page").size()){\n\t\t\t$("#button_next_page").click(function(){\n\t\t\t\t$("#form_search #input_page").val(pageId + 1);\n\t\t\t\t$("#form_search").submit();\n\t\t\t});\n\t\t}\n\t\t$(".result_item").click(function(){window.location = $(this).attr("alt");});\n\t});\n</script>\n<div id="search_bound">\n\t<h1>\u641c\u7d22</h1>\n\t<div class="page_column_left_padding15">\n\t\t<div class="top"></div>\n\t\t<div class="content">\n\t\t\t<form id="form_search" action="/search" method="get">\n\t\t\t\t<div>\n\t\t\t\t\t<label>\u5173\u952e\u5b57</label>\n')
        # SOURCE LINE 65
        if 'q' in request.GET :
            # SOURCE LINE 66
            __M_writer(u'\t\t\t\t\t\t<input name="q" value="')
            __M_writer(filters.decode.utf8(request.GET['q']))
            __M_writer(u'"></input>\n')
            # SOURCE LINE 67
        else :
            # SOURCE LINE 68
            __M_writer(u'\t\t\t\t\t\t<input name="q"></input>\n')
            pass
        # SOURCE LINE 70
        __M_writer(u'\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<label>\u641c\u7d22\u9009\u9879</label>\n\t\t\t\t\t<span id="search_options">\n\t\t\t\t\t\t<input type="radio" id="type1" name="type" value="1"/><label for="type1">\u5730\u70b9</label>\n\t\t\t\t\t\t<input type="radio" id="type2" name="type" value="2"/><label for="type2">\u8bdd\u9898</label>\n\t\t\t\t\t\t<input type="radio" id="type3" name="type" value="3"/><label for="type3">\u4f18\u60e0</label>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span id="submit"></span>\n\t\t\t\t</div>\n\t\t\t\t<input type="hidden" name="page" value="')
        # SOURCE LINE 80
        __M_writer(filters.decode.utf8(c.page))
        __M_writer(u'" id="input_page"></input>\n\t\t\t</form>\n')
        # SOURCE LINE 82
        if c.errMsg == 'too fast' :
            # SOURCE LINE 83
            __M_writer(u'\t\t\t\t<div style="width:100%;height:20px;clear:both;"></div>\n\t\t\t\t<h2>\u60a8\u7684\u641c\u7d22\u8bf7\u6c42\u63d0\u4ea4\u8fc7\u4e8e\u9891\u7e41\uff0c\u8bf7\u7a0d\u5019\u518d\u8bd5\u3002</h2>\n')
            # SOURCE LINE 85
        elif c.result != None :
            # SOURCE LINE 86
            __M_writer(u'\t\t\t\t<div style="width:100%;height:20px;clear:both;"></div>\n\t\t\t\t<h2>\u641c\u7d22\u7ed3\u679c</h2>\n\t\t\t\t<div style="width:100%;height:5px;clear:both;"></div>\n')
            # SOURCE LINE 89
            if c.resultCount == 0 :
                # SOURCE LINE 90
                __M_writer(u'\t\t\t\t\t<div style="margin-left:10px;">\u641c\u7d22\u7ed3\u679c\u4e3a\u7a7a\u3002</div>\n')
                # SOURCE LINE 91
            else :
                # SOURCE LINE 92
                if c.searchType == '1' :
                    # SOURCE LINE 93
                    for r in c.result :
                        # SOURCE LINE 94
                        __M_writer(u'\t\t\t\t\t\t\t<div class="result_item" style="border-top:1px solid #EEEEEE;padding:5px;" alt="/map/maploc?id=')
                        __M_writer(filters.decode.utf8(r.id))
                        __M_writer(u'">\n\t\t\t\t\t\t\t\t<div style="font-size:14px;font-weight:bold;">')
                        # SOURCE LINE 95
                        __M_writer(filters.decode.utf8(r.name))
                        __M_writer(u'</div>\n\t\t\t\t\t\t\t\t<div>')
                        # SOURCE LINE 96
                        __M_writer(filters.decode.utf8(r.address))
                        __M_writer(u'</div>\n\t\t\t\t\t\t\t</div>\n')
                        pass
                    # SOURCE LINE 99
                elif c.searchType == '2' :
                    # SOURCE LINE 100
                    for r in c.result :
                        # SOURCE LINE 101
                        __M_writer(u'\t\t\t\t\t\t\t<div class="result_item" style="border-top:1px solid #EEEEEE;padding:5px;" alt="/map/maploc/topic?id=')
                        __M_writer(filters.decode.utf8(r.id))
                        __M_writer(u'">\n\t\t\t\t\t\t\t\t<div style="font-size:14px;font-weight:bold;">')
                        # SOURCE LINE 102
                        __M_writer(filters.decode.utf8(r.title))
                        __M_writer(u'</div>\n\t\t\t\t\t\t\t\t<div>By ')
                        # SOURCE LINE 103
                        __M_writer(filters.decode.utf8(r.user.name))
                        __M_writer(u'</div>\n\t\t\t\t\t\t\t</div>\n')
                        pass
                    # SOURCE LINE 106
                elif c.searchType == '3' :
                    # SOURCE LINE 107
                    for r in c.result :
                        # SOURCE LINE 108
                        __M_writer(u'\t\t\t\t\t\t\t<div class="result_item" style="border-top:1px solid #EEEEEE;padding:5px;" alt="/map/maploc?id=')
                        __M_writer(filters.decode.utf8(r.store.id))
                        __M_writer(u'">\n\t\t\t\t\t\t\t\t<div style="font-size:14px;font-weight:bold;">')
                        # SOURCE LINE 109
                        __M_writer(filters.decode.utf8(r.name))
                        __M_writer(u'</div>\n\t\t\t\t\t\t\t\t<div>\u5546\u6237\uff1a')
                        # SOURCE LINE 110
                        __M_writer(filters.decode.utf8(r.store.mapLoc.name))
                        __M_writer(u'</div>\n\t\t\t\t\t\t\t</div>\n')
                        pass
                    pass
                pass
            # SOURCE LINE 115
            if c.page * 20 + 20 < c.resultCount or c.page > 0 :
                # SOURCE LINE 116
                __M_writer(u'\t\t\t\t\t<div id="bottom_nav">\n\t\t\t\t\t\t<span style="float:left;color:#666666;">\u7b2c')
                # SOURCE LINE 117
                __M_writer(filters.decode.utf8(c.page + 1))
                __M_writer(u'\u9875\uff0c\u5171')
                __M_writer(filters.decode.utf8((c.resultCount - 1) / 20 + 1))
                __M_writer(u'\u9875</span>\n')
                # SOURCE LINE 118
                if c.page * 20 + 20 < c.resultCount :
                    # SOURCE LINE 119
                    __M_writer(u'\t\t\t\t\t\t\t<span id="button_next_page"></span>\n')
                    pass
                # SOURCE LINE 121
                __M_writer(u'\t\t\t\t\t\t<span style="float:right;width:10px;height:10px;"></span>\n')
                # SOURCE LINE 122
                if c.page > 0 :
                    # SOURCE LINE 123
                    __M_writer(u'\t\t\t\t\t\t\t<span id="button_last_page"></span>\n')
                    pass
                # SOURCE LINE 125
                __M_writer(u'\t\t\t\t\t</div>\n')
                pass
            pass
        # SOURCE LINE 128
        __M_writer(u'\t\t</div>\n\t\t<div class="bottom"></div>\n\t</div>\n\t<div class="page_column_right_padding_left30">\n\t\t<div class="top"></div>\n\t\t<div class="content">\n\t\t\t<h2>TIPS</h2>\n\t\t\t<p>\u641c\u7d22\u65f6\uff0c\u60a8\u53ef\u4ee5\u8f93\u5165\u591a\u4e2a\u5173\u952e\u8bcd\uff0c\u4e2d\u95f4\u7528\u7a7a\u683c\u9694\u5f00\u3002</p>\n\t\t</div>\n\t\t<div class="bottom"></div>\n\t</div>\n</div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


